package com.forum.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.forum.annotation.Excel;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassNameTokenentity
 * @Author 张继成
 * @Date 2023/11/13 10:48
 */
@Data
@ApiModel(description = "token表")
public class Token implements Serializable {
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long UserId;

    /** 用户名 */
    @Excel(name = "用户名")
    private String UserName;

    /** 表名 */
    @Excel(name = "表名")
    private String TabName;

    /** 角色 */
    @Excel(name = "角色")
    private String Role;

    /** 密码 */
    @Excel(name = "密码")
    private String Token;

    /** 新增时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date Addtime;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ExpiratedTime;

    public Token(Long userId, String userName, String tabName, String role, String token, Date expiratedTime) {
        super();
        this.id = id;
        UserId = userId;
        UserName = userName;
        TabName = tabName;
        Role = role;
        Token = token;
        ExpiratedTime = expiratedTime;
    }
    public Token(){

    }


}
